﻿@{
    ViewBag.Title = "编辑停车区立柱信息";
    Layout = "~/Views/Shared/_Layout.cshtml";
     <script type="text/javascript">
        $(document).ready(function() {
            $("#btnCancel").click(function() {
                $("#AllLocation").append($("#AccessTo").find(":selected").removeAttr("selected"));
                $("#AccessTo").remove($("#AllLocation").find(":selected"));
            });
            $("#btnSelect").click(function() {
                $("#AccessTo").append($("#AllLocation").find(":selected").removeAttr("selected"));
                $("#AllLocation").remove($("#AllLocation").find(":selected"));
            });
            $("#btnSubmit").click(function() {
                $("#AccessTo").find("option").attr("selected", "selected");
                $("#frm").submit();
            });
        });
    </script>
}
@using AFT.Parking.Entity;
@model ParkingLocation
<div class="content-box">
    <!-- Start Content Box -->
    <div class="content-box-header">
        <h3>编辑停车区立柱信息</h3>
        <div class="clear"></div>
    </div>
    <!-- End .content-box-header -->
    <div class="content-box-content">

        <div class="tab-content default-tab" id="tab2">
            <form method="post" id="frm">
                <fieldset>
                    <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns -->
                    <p>
                        <label>停车场名称</label>
                        @ViewBag.ParkingName
                    </p>
                    <p>
                        <label>停车区名称</label>
                        @ViewBag.ParkingAreaName
                    </p>
                    @Html.Hidden("ParkingAreaId", Model.ParkingAreaId)
                  
                    <p>
                        <label>柱子名称</label>
                        @Html.TextBox("Name", Model.Name, new { @class = "text-input medium-input" })
                    </p>
                    <p>
                        <label>X轴/Y轴</label>
                        @Html.TextBox("LocationX", Model.LocationX, new { @class = "text-input small-input" })
                        -
                        @Html.TextBox("LocationY", Model.LocationY, new { @class = "text-input small-input" })
                        <br />
                        <small>分别输入柱子在图片上的X轴-Y轴。</small>
                        @*<span class="input-notification error png_bg">Error message</span>*@
                    </p>
                    <p>
                        <label>岔口</label>
                        @Html.CheckBox("IsFork", Model.IsFork)
                    </p>
                    <p>
                        <label>启用</label>
                        @Html.CheckBox("IsEnable", Model.IsEnable)
                    </p>
                    <p>
                        <label>打印二维码个数</label>
                        @Html.TextBox("PrintScanCodeCount", Model.PrintScanCodeCount)
                    </p>
                    <p>
                        <label>互通柱子</label>

                        @Html.ListBox("AllLocation", ViewData["AllLocation"] as List<SelectListItem>, new { @style = "width:200px;height:200px" })
                        <input type="button" id="btnCancel" value="<<取消选中" />
                        <input type="button" id="btnSelect" value="添加选中>>" />
                        @Html.ListBox("AccessTo", ViewData["AccessTo"] as List<SelectListItem>, new { @style = "width:200px;height:200px" })
                        <br />
                        <small>分别输入柱子在图片上的X轴-Y轴。</small>
                        @*<span class="input-notification error png_bg">Error message</span>*@
                    </p>
                    <p>
                        <input class="button" type="button" id="btnSubmit" value=" 保 存 " />
                        <input class="button" type="button" id="btnBack" value=" 返 回 " /> <br />
                        <span class="input-notification @ViewBag.Icon png_bg">@ViewBag.Message</span>
                        <input type="hidden" id="hd_backUrl" value="/parkingAreas/locations?parkingAreaId=@Model.ParkingAreaId">
                    </p>
                </fieldset>
                <div class="clear"></div>
                <!-- End .clear -->
            </form>
        </div>
        <!-- End #tab2 -->
    </div>
    <!-- End .content-box-content -->
</div>


